Skip to content

add IPv6 support#752

Open
yibozhuang wants to merge 1 commit into
apple:mainfrom
yibozhuang:ipv6-support
Open

add IPv6 support#752
yibozhuang wants to merge 1 commit into
apple:mainfrom
yibozhuang:ipv6-support

Conversation

@yibozhuang
Copy link
Copy Markdown
Contributor

Extends the network plumbing to support per-interface IPv6 address configuration.
The Interface protocol supports ipv6Address and ipv6Gateway.
The agent's networking RPCs carry per-family fields via new InterfaceAddress, LinkRoute, and DefaultRoute types in ContainerizationExtras.
NetlinkSession adds IPv6 methods for address and route operations.

Extends the network plumbing to support per-interface IPv6 address
configuration. The `Interface` protocol supports `ipv6Address` and
`ipv6Gateway`. The agent's networking RPCs carry per-family fields
via new `InterfaceAddress`, `LinkRoute`, and `DefaultRoute` types
in `ContainerizationExtras`. `NetlinkSession` adds IPv6 methods
for address and route operations.

Co-authored-by: Michael Crosby <crosbymichael@gmail.com>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VirtualMachineAgent+Interface.swift?

if ipv4Gateway == nil && ipv6Gateway == nil {
logger?.debug("no gateway for \(name)")
}
try await routeAddDefault(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this something we can skip if v4 and v6 gateway are both nil?

/// - id: The container ID.
/// - ipv6Address: The IPv6 CIDR address to assign to the interface.
/// - ipv6Gateway: The IPv6 gateway address for the default route.
public mutating func createInterface(_ id: String, ipv6Address: CIDRv6, ipv6Gateway: IPv6Address? = nil) throws -> Containerization.Interface? {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dumb question, this call was supposed to be the "just give me a NIC" call that ContainerManager can use. Can our allocator not be extended to also give us a v6 addr?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants